Skip to content

Sync with ruby core#30

Merged
peterzhu2118 merged 2 commits into
mainfrom
sync-ruby-core
May 2, 2025
Merged

Sync with ruby core#30
peterzhu2118 merged 2 commits into
mainfrom
sync-ruby-core

Conversation

@hsbt
Copy link
Copy Markdown
Member

@hsbt hsbt commented May 2, 2025

No description provided.

byroot added 2 commits May 2, 2025 10:49
`objspace->finalizer_table` must be synchronized,
otherwise concurrent insertion from multiple ractors
will cause a crash.

Repro:

```ruby
ractors = 5.times.map do |i|
  Ractor.new do
    100_000.times.map do
      o = Object.new
      ObjectSpace.define_finalizer(o, ->(id) {})
      o
    end
  end
end

ractors.each(&:take)
```
@hsbt hsbt changed the title Sync with uby core Sync with ruby core May 2, 2025
Copy link
Copy Markdown
Member

@peterzhu2118 peterzhu2118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@peterzhu2118 peterzhu2118 merged commit b7b6389 into main May 2, 2025
20 checks passed
@peterzhu2118 peterzhu2118 deleted the sync-ruby-core branch May 2, 2025 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants